﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MyMaster.master" AutoEventWireup="true" CodeFile="GioHang.aspx.cs" Inherits="GioHang" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="margin:10px 25px 0px 25px;">
        <br />
        <asp:Label ID="lbl_tieude" runat="server" Font-Size="14" Font-Bold="true" Text="Giỏ hàng của bạn"></asp:Label>
        <center>
            <br />
            <table border="1" style="width:90%;">
                <tr>
                    <td>
                        <asp:Label ID="lbl_thongbao" runat="server" Text="Hiện bạn chưa có sản phẩm nào trong giỏ hàng" Font-Size="14" />
                        <asp:GridView ID="grv_giohang" runat="server" AutoGenerateColumns="False" 
                            CellPadding="4" DataKeyNames="id_sp" Width="100%" 
                            onrowcommand="grv_giohang_RowCommand" GridLines="None" ForeColor="#333333" 
                            EnableModelValidation="True">
                            <RowStyle BackColor="#EFF3FB" />
                            <Columns>
                                <asp:BoundField DataField="id_sp" HeaderText="Mã sản phẩm" >
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField DataField="tensp" HeaderText="Tên sản phẩm">
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Số lượng">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_soluong" runat="server" Height="21px" 
                                            Text='<%# Eval("soluong") %>' Width="60px"></asp:TextBox>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="dongia" HeaderText="Đơn giá" 
                                    DataFormatString="{0:###,###}" >
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField DataField="thanhtien" HeaderText="Thành tiền" 
                                    DataFormatString="{0:###,###}" >
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:ButtonField ButtonType="Image" HeaderText="Xóa" 
                                    ImageUrl="~/images/Xoa.jpg" CommandName="nutxoa" >
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:ButtonField>
                            </Columns>
                            <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
                            <PagerStyle ForeColor="White" HorizontalAlign="Center" BackColor="#2461BF" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <AlternatingRowStyle BackColor="#DCDCDC" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td style="text-align:right">
                        <asp:Label ID="lbl_tongcong" runat="server" Text="Tổng cộng: " /> <br />
                    </td>
                </tr>
                <tr>
                    <td style="text-align:center">
                        <asp:Button ID="cmd_tieptucmua" runat="server" Text="Tiếp tục mua" 
                            onclick="cmd_tieptucmua_Click" /> &nbsp;&nbsp;
                        <asp:Button ID="cmd_xoagiohang" runat="server" Text="Xóa giỏ hàng" 
                            onclick="cmd_xoagiohang_Click" /> &nbsp;&nbsp;
                        <asp:Button ID="cmd_capnhap" runat="server" Text="Cập nhật" 
                            onclick="cmd_capnhap_Click" /> &nbsp;&nbsp;
                        <asp:Button ID="cmd_thanhtoan" runat="server" Text="Thanh toán" 
                            onclick="cmd_thanhtoan_Click" /> &nbsp;&nbsp;
                    </td>
                </tr>
            </table>
        </center>
    </div>
</asp:Content>

